package com.yin.bank.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("bank_account")
public class Account {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String password;
    private Double balance;

    public Account() {
    }

    public Account(Long id, String password, Double balance) {
        this.id = id;
        this.password = password;
        this.balance = balance;
    }

    public Account(String password, Double money) {
        this.password = password;
        this.balance = money;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", password='" + password + '\'' +
                ", balance=" + balance +
                '}';
    }
}
